const pathList = ['resent', 'friend', 'group'] as const

type Path = (typeof pathList)[number]

interface navState {
  path: Path
}

const navModule = {
  state: (): navState => ({
    path: 'resent'
  }),
  mutations: {
    SET_PATH(state: navState, path: Path) {
      state.path = path
    }
  },
  getters: {
    getNavPath: (state: navState) => state.path
  }
}

export default navModule
